In automatic production facilities at a plant, a sequence controller that controls devices is often configured by one controller and a plurality of controlled devices, thereby establishing a distributed control system. In this case, several dozens of buses are often connected to the controlled devices.
In the distributed control system, identification codes (device numbers) need to be allocated to the respective devices to connect between the devices. Conventionally, an identification code setter is provided in each device, and each identification code setter is manually operated to set an identification code to each device. However, this manual setting method faces a high risk of erroneous setting due to an operation error.
According to Patent Literature 1, an electronic exchange system automatically sets device numbers to a plurality of devices that constitute the electronic exchange system.
According to an invention described in the Patent Literature 1, a reference device and a plurality of devices are connected in series using two data lines respectively. The reference device transmits basic signals A and B, having a predetermined delay difference, to a first device via the two data lines. The first device detects the delay difference between the basic signals A and B, and sets a device number of the self device (the first device) based on the detected delay difference. At the same time, the first device gives a predetermined delay difference to the received basic signals A and B, and transmits the basic signals A and B, having the further delay difference, to a second device via two data lines. The second device detects the delay difference between the received basic signals A and B having the further delay difference, and sets a device number of the self device (the second device) based on the detected delay difference. At the same time, the second device further gives a predetermined delay difference to the received basic signals A and B, and transmits the basic signals A and B, having the still further delay difference, to a third device via two data lines. The third device, a fourth device, and subsequent devices execute similar processing, respectively.
For example, “1” is set to the reference device as a device number of the reference device, and a delay difference of two clocks is determined to correspond to the numeric value “1”. Assuming that a delay difference between the basic signal A and B transmitted from a reference device 1 is four clocks, the first device receives the basic signals A and B, and sets “2” as a device number of the self device. At the same time, the first device gives a further delay difference to the basic signals A and B, and transmits the basic signals A and B, having a delay difference of six clocks, to the second device. The second device receives the basic signals A and B having the delay difference of six clocks, and sets “3” as a device number of the self device. At the same time, the second device gives a further delay difference to the basic signals A and B, and transmits the basic signals A and B, having a delay difference of eight clocks, to the third device. Subsequent devices carry out a similar operation.
According to the above conventional technique, however, each device needs to receive and output the two basic signals A and B, respectively. Therefore, each device requires four contacts in total, for two inputs and two outputs, to propagate the basic signals A and B. Since each device has many contacts, many pins are required for connectors. Unlike the electronic exchanger, the sequence controller configures a system by connecting small-scale devices with several dozens of buses. Therefore, when the above conventional technique is employed, cost ratio for the pins increase. A rise in the expense due to many pins substantially increases the total cost of the system. Since the conventional technique requires the two basic signals A and B having a delay difference, each device requires two systems of signal transmission units, which increases cost.
According to the conventional technique, when the basic signals having a delay difference are affected by noise in the environment of many disturbances such as noise, the basic signals provide wrong identification codes. Therefore, these signals require a separate noise removing function. In other words, when an error occurs in the identification code, communication itself becomes impossible. Therefore, an error detecting function having at least the same level as that of an error detecting function for data transmission is necessary for the transmission of the basic signals. Provision of an error detector equivalent to that for data transmission as represented by a cyclic code, as a noise countermeasure for the transmission of the basic signals, increases the cost.
The error detector for the basic signals can be omitted, when the error detector is shared with a data transmitter. However, when controlled devices are added to the sequence controller, it is necessary to provide identification codes after completion of a data transmission or provide identification codes by interrupting a data transmission. Therefore, identification code provision processing cannot be carried out during a data transmission.
The present invention has been achieved in order to solve the above problems, and it is an object of the present invention to provide a low-cost sequence controller that does not provide a wrong identification code due to the influence of noise.
Patent Literature 1 (Japanese Patent Application Laid-Open No. S64-68862).